package until;

import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;

import java.io.IOException;

public class GetWithParam {
    //带参数的Get方法，参数直接跟在url后面
    public static void getNoParam(String url) throws IOException {
        HttpGet get=new HttpGet(url);
//        //用来执行get方法的
        DefaultHttpClient client=new DefaultHttpClient();
        HttpResponse response = client.execute(get);
        String result= EntityUtils.toString(response.getEntity());
        System.out.println(result);
    }
}
